From 59f7c7653798e0e0e39a8931562576c3b036218c Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 22 Apr 2025 11:14:07 +0200 Subject: [PATCH] feat: better logs when a file cannot be removed should log the reason why a file cannot be deleted Signed-off-by: Matthieu Gallien --- src/common/filesystembase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/filesystembase.cpp b/src/common/filesystembase.cpp index b63f6c1a7..7ab136b42 100644 --- a/src/common/filesystembase.cpp +++ b/src/common/filesystembase.cpp @@ -595,6 +595,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) if (errorString) { *errorString = QObject::tr("File is already deleted"); } + qCWarning(lcFileSystem()) << "File is already deleted" << fileName; return false; } } @@ -603,6 +604,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) if (errorString) { *errorString = QString::fromLatin1(e.what()); } + qCWarning(lcFileSystem()) << e.what() << fileName; return false; } catch (...) @@ -610,6 +612,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString) if (errorString) { *errorString = QObject::tr("Error deleting the file"); } + qCWarning(lcFileSystem()) << "Error deleting the file" << fileName; return false; } -- 2.30.2